<template>
  <div class='cart'>
    <my-header :title="'商家信息'"></my-header>


    <div class="banner" v-show="curPage === 'OrderFoodView'">
      <h3>意大利特火小面条馆</h3>
      <p>生活总是有很多的失败，就好比游戏的....</p>
      <p>公告：失败了，就失败了，爬起来总结一下再继续</p>
      <img src="../../assets/images/bus.png" alt="">
    </div>


    <nav>
      <ul>
        <li @click="curPage = 'OrderFoodView'" :class="{ 'active': curPage === 'OrderFoodView' }">点餐</li>
        <li @click="curPage = 'EvaluateView'" :class="{ 'active': curPage === 'EvaluateView' }">评价</li>
        <li @click="curPage = 'BusinessView'" :class="{ 'active': curPage === 'BusinessView' }">商家</li>
      </ul>
    </nav>
    <component :is="curPage"></component>
  </div>
</template>

<script>
import MyHeader from "@/components/MyHeader.vue"

import OrderFoodView from "@/views/cart/OrderFoodView.vue"
import EvaluateView from "@/views/cart/EvaluateView.vue"
import BusinessView from "@/views/cart/BusinessView.vue"

export default {
  name: '',
  data() {
    return {
      curPage: "OrderFoodView"
    }
  },
  components: { MyHeader, OrderFoodView, EvaluateView, BusinessView },
  created() { },
  mounted() { },
  methods: {

  }
}
</script>
<style scoped lang='scss'>

body{
  overflow: hidden;
}
.cart{
  height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.banner {
  width: 3.43rem;
  height: 1.06rem;
  background-color: aliceblue;
  margin: 0 auto;
  box-sizing: border-box;
  padding: 12px;
  position: relative;
  h3{
    font-size: 18px;
    font-weight: 400;
    color:rgba(46, 52, 58, 1);
  }
  p{
    font-size: 12px;
    color:rgba(144, 152, 160, 1);
  }
  img{
    position: absolute;
    top: 12px;
    right: 12px;
  }
}

nav {
  width: 50vw;
  margin-left: 16px;
  margin-top: 28px;
  // margin-bottom: 20px;

  ul {
    widows: 100%;
    display: flex;

    li {
      flex: 1;
      position: relative;
    }
  }
}

.active::after {
  content: "";
  display: inline-block;
  height: 3px;
  width: 31px;
  background-color: rgba(37, 136, 255, 1);
  position: absolute;
  left: 0;
  bottom: 3px;
  z-index: -1;
}
</style>
